/**
 * Created by liubin on 2014/06/13.
 */
Ext.define('Order.store.Cart', {
    extend: 'Ext.data.Store',
    config: {
        model: 'Order.model.Cart',
        autoLoad: true,
        sorters: 'price',
        grouper: function(record) {
            return record.get('store_name');
        },
        proxy: {
            type:'rest',
            batchActions: true,
            url: 'api/cart',
            reader: {
                type: 'json',
                rootProperty: 'data',
                clientIdProperty: 'id',
                successProperty: 'success'
            }
        }
    }
})